package App;

import Control.MainView;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;

import java.net.URL;

public class DemoStart extends Application{
    public  URL urlHistory = getClass().getResource("../View/MainView.fxml");
    public  URL urlControl = getClass().getResource("../View/MainView.fxml");
    public static Stage currentStage;
    private static Parent FXroot = null;

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) throws Exception {
        URL url = getClass().getResource("../View/MainView.fxml");
        AnchorPane root = FXMLLoader.load(url);
        AnchorPane rootHistory = FXMLLoader.load(urlHistory);
        AnchorPane rootControl = FXMLLoader.load(urlControl);
        Scene scene = new Scene(root,625,532);
        Scene sceneHistory = new Scene(rootHistory,600,600);
        Scene sceneControl = new Scene(rootControl,600,600);
        primaryStage.setScene(scene);
        primaryStage.setTitle( "车辆管理系统");
        primaryStage.show();
    }

    public static Parent getRoot(){
        return FXroot;
    }
}
